package com.sdry.common;

/**
 * @author Administrator
 */

public enum PatentType {

    openNumber("openNumber","公开(公告)号"),
    Name("name","标题"),
    applyDate("applyDate","申请日"),
    openDate("openDate","公开(公告)日"),
    internationalOpenDate("internationalOpenDate","授权日"),
    inventor("inventor","发明人"),
    applyBy("applyBy","当前申请(专利权)人"),
    classifyNumber1("classifyNumber1","IPC分类号"),

    ;



    private String code;
    private String name;

    PatentType(String code, String name){
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public static String getNameByCode(String code){
        for (PatentType value : values()) {
            if(value.code.equals(code)){
                return value.name;
            }
        }
        //没有则返回null；
        return "null";

    }
}
